let calculator = new Vue({
    el: "#calculator",
    data: {
        height: 1.78,
        weight: 70,
    },
    computed: {
        count: function () {
            let num = this.weight / (this.height * this.height);
            return num.toFixed(2);
        },
        print: function () {
            if(this.count <= 18.4) {
                return "偏瘦";
            } else if (this.count <= 23.999) {
                return "正常"
            } else if (this.count <= 27.999) {
                return "过重"
            } else if (this.count >= 28) {
                return "肥胖"
            }
        }
    }
});